package cn.com.agree.order.client;

import cn.com.agree.order.dto.CartDTO;
import cn.com.agree.order.entity.ProductInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * Descriptions...
 *
 * @author sun.ys
 * @date 2020/11/14.
 */
@FeignClient(name="product")
public interface ProductClient {
    
    
    @GetMapping("/msg")
    String  productMsg();
    
    @PostMapping("/product/listForOrder")
    List<ProductInfo>  listForOrder(@RequestBody List<String> productIdList);
    
    
    @PostMapping("/product/decreaseStock")
      void decreaseStock(@RequestBody List<CartDTO> cartDTOList);
}
